function closeCityWindow(event){
	selectLayer.die();
	selectLayer.removeAllChild();
	internalMap.clearSelect();
	internalMap.cityView = false;
}
function cityView(event){
	internalMap.cityProperty();
}
function cityCharaView(event){
	internalMap.characterView(0);
}
function InternalAffairsCharacterShow(event){
	internalMap.characterProperty();
}
function cityCharacterListUp(event){
	if(internalMap.chara.index - 9 < 0)return;
	internalMap.chara.index -= 9;
	internalMap.chara.showList();
}
function cityCharacterListDown(event){
	if(internalMap.chara.index + 9 >= mapData[0].charas.length)return;
	internalMap.chara.index += 9;
	internalMap.chara.showList();
}
function InternalAffairsMapMove(event){
	if(!mouseObject.isDown || internalMap.cityView)return;
	//backLayer.x = event.selfX - mouseObject.x + mouseObject.mapx;
	backLayer.y = event.selfY - mouseObject.y + mouseObject.mapy;
	if(backLayer.y > 0)backLayer.y = 0;
	if(backLayer.y < LGlobal.height - 592)backLayer.y = LGlobal.height - 592;
}
function InternalAffairsMapDown(event){
	if(mouseObject.isDown || internalMap.cityView)return;
	mouseObject.isDown = true;
	mouseObject.x = event.selfX;
	mouseObject.y = event.selfY;
	mouseObject.mapx = backLayer.x;
	mouseObject.mapy = backLayer.y;
}
function InternalAffairsMapUp(event){
	if(internalMap.cityView || internalMap.cityView)return;
	mouseObject.isDown = false;
	var cx = event.offsetX - backLayer.x;
	var cy = event.offsetY - backLayer.y;
	for(var i=0;i<mapData.length;i++){
		var city = mapData[i];
		if(cx >= city.coordinate[0] - 10 && cx <= city.coordinate[0] + 10 && 
			cy >= city.coordinate[1] - 10 && cy <= city.coordinate[1] + 10){
			internalMap.cityIndex = i;
			showSelfCity();
			break;
		}
	}
	
}